package com.css.fxfzypg.modules.baseData.repository;

import com.css.fxfzypg.modules.baseData.queryParams.SchoolQueryParams;
import com.css.fxfzypg.modules.baseData.entity.SchoolEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.repository.query.Param;

import java.sql.Timestamp;
import java.util.List;
import java.util.Map;

/**
 * @author y1fan
 * @create 2022-08-15 17:20
 */
public interface SchoolRepository {


    SchoolEntity saveSchool(SchoolEntity schoolEntity);

    SchoolEntity findSchoolById(String dataSchoolId);

    Map<String,Object> getAllSchoolByParams(SchoolQueryParams queryParams);

    void deleteSchool(@Param(value = "ids") List<Integer> ids, @Param(value = "currentTimestamp") Timestamp currentTimestamp,@Param(value = "userID")String userID);

    List<SchoolEntity> exportExcel();

    void importExcel(List<SchoolEntity> schoolEntities);

    Integer countByCounty(String province, String city, String county);
    Integer countByCity(String province, String city);
    Integer countByProvince(String province);

    Integer countByProvinceAndYear(String provinceName, String taskYear);
}
